<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
        <h:form id="frmCreateRegisterCode">
            <f:view>
                <p:dialog id="dlgCreateRegisterCode"
                          widgetVar="wgCreateRegisterCode"
                          header="Create Register Code"
                          draggable="true"
                          showEffect="fade"
                          hideEffect="clip"
                          >

                    <h:outputLabel for="codeResgiterId" value="Code Register :" />
                    <p:inputText id="codeResgiterId" value="#{employeeManagement.users.codeRegister}" readonly="true"  />

                    <h:outputLabel rendered="#{system.manager}" for="jobEmployeeId" value="Job Employee :" />
                    <h:selectOneMenu rendered="#{system.manager}" id="jobEmployeeId" value="#{employeeManagement.job.jobId}" title="Job" required="true" >
                        <f:selectItems value="#{jobManagement.list}" var="item" itemLabel="#{item.jobTitle}" itemValue="#{item.jobId}" />
                    </h:selectOneMenu>
                    <h:outputLabel for="stEmployee" value="Status :" />
                    <h:selectOneMenu  id="stEmployee" value="#{employeeManagement.users.isLock}" title="Job" required="true" >
                        <f:selectItem itemLabel="False" itemValue="False"  />
                        <f:selectItem  itemLabel="True" itemValue="True" />

                    </h:selectOneMenu>
                    <f:facet name="footer">
                        <p:commandButton id="btnGenerateCode"
                                         value="Generate"
                                         icon="ui-icon-check"
                                         style="margin:0"
                                         update=":growl,
                                         :frmCreateRegisterCode:codeResgiterId"
                                         actionListener="#{employeeManagement.generateCode}"
                                         />
                        <p:commandButton value="Save"
                                         actionListener="#{employeeManagement.create}"
                                         oncomplete="EmployeeManagementRequest(xhr, status, args)"
                                         update=":growl,:frmViewCodeRegister:dtViewCodeRegister"
                                         icon="ui-icon-check"
                                         style="margin:0"/>
                    </f:facet>


                </p:dialog>
            </f:view>


        </h:form>
</html>
